//logs.js
var util = require('../../utils/util.js')
Page({
  data: {
    segment:[{"class":"item","title":"知识列表","url":"/pages/college/index","isred":"0"},
    {"class":"item","title":"最新资讯","url":"/pages/faq/index","isred":"1"},
    {"class":"item-sel","title":"在线互动","url":"/pages/online/index","isred":"1"}],
    ret1:{"style":"display:none;"}
  },
  formSubmit:function(event){
    console.log('表单提交事件，数据:'+event.detail.value)
  },
  changeSeg :function(event){
    var url = event.currentTarget.dataset.url
    var isred = event.currentTarget.dataset.isred
    var that = this
    if (isred == "0") {
      wx.switchTab({
        url:url
      })  
    }else{
       wx.redirectTo({
        url:url
      })
    }
  },
  showRet:function(event){
    var tagId = event.currentTarget.dataset.id
    var that = this
    that.setData({
      ret1:{ "style":"display:block;"}
    })
  },
  goMessage:function(){
    wx.navigateTo({
      url: '../message/index'
    })
  },
  hideRet:function(event){
    console.log('hideRet')
    var tagId = event.currentTarget.dataset.id
    var that = this
    that.setData({
      ret1:{"style":"display:none;"}
    })
  },
  onLoad: function () {
   
  }
})
